package com.itheima.spring.bestpractive.config;

import com.github.pagehelper.PageInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Properties;

/**
 * @version 1.0
 * @author: HZY
 * @date: 2025/7/10 8:36
 * @Content:
 */
@Configuration
public class PackageConfig {
    @Bean
    PageInterceptor pageInterceptor(){
        PageInterceptor pageInterceptor = new PageInterceptor();
        Properties properties = new Properties();
        properties.setProperty("reasonable", "true");	//分页合理化
        pageInterceptor.setProperties( properties);
        return pageInterceptor;
    }
}
